<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
      // if的小括号内的隐式类型转换
    // 判断是否是奇数

    var n = 5;
    var result = "";
    var res = n % 2 ? "ok" : "no";
    function fn(){
        
    if( n % 2 ){
        result = "ok";
        // console.log("ok")
    } else{
        result = "ok";
        // console.log("no")
    }
    console.log(result)
    console.log(res)       
    }
    fn()


    //三元运算符
    //计算数据
    
    
    
  










   




</script>
</html>